import request from '@/utils/request'

// 创建团的计划
export function add(data) {
  return request({
    url: '/admin/factordata/project/add',
    method: 'post',
    data
  })
}

// 获取计划列表
export function getList(params) {
  return request({
    url: '/admin/factordata/project/search',
    method: 'get',
    params
  })
}

// 编辑
export function edit(data) {
  return request({
    url: '/admin/factordata/project/edit',
    method: 'post',
    data
  })
}

// 批量创建
export function adds(data) {
  return request({
    url: '/admin/factordata/project/batadd',
    method: 'post',
    data
  })
}

// 删除
export function remove(data) {
  return request({
    url: '/admin/factordata/project/del',
    method: 'post',
    data
  })
}

// 设置状态
export function setStatus(data) {
  return request({
    url: '/admin/factordata/project/setstatus',
    method: 'post',
    data
  })
}

// 获取详情
export function getDetail(params) {
  return request({
    url: '/admin/factordata/project/detail',
    method: 'get',
    params
  })
}

// 获取团号
export function getPlanCodeDetail(params) {
  return request({
    url: '/admin/factordata/plansetting/detail',
    method: 'get',
    params
  })
}

// 设置团号
export function setPlanCode(data) {
  return request({
    url: '/admin/factordata/plansetting/save',
    method: 'post',
    data
  })
}

// 团期文件创建
export function uploadPlanFile(data) {
  return request({
    url: '/admin/factordata/planfile/add',
    method: 'post',
    data
  })
}

// 团期文件列表
export function planFileList(params) {
  return request({
    url: '/admin/factordata/planfile/search',
    method: 'get',
    params
  })
}

// 批量删除
export function deletePlanFile(data) {
  return request({
    url: '/admin/factordata/planfile/del',
    method: 'post',
    data
  })
}
